

import com.fasterxml.jackson.core.type.TypeReference;
import com.tools.common.object.C;
import com.tools.common.object.json.JsonKit;

import java.util.HashMap;
import java.util.Map;

public class TY {

    public static void main(String[] args) {
        String json = "{\"c\":1586, \"m\":\"刚好\"}";

//        long s2 = System.currentTimeMillis();
//        Map<String, Object> res2 = JsonKit.toEntity(json, new TypeReference<HashMap<String, Object>>() {});
//        long e2 = System.currentTimeMillis();
//        System.out.println(res2);
//        System.out.println("耗时: " + (e2 - s2));


        long s1 = System.currentTimeMillis();
        Map<String, Object> res1 = JsonKit.toEntity(json, new C<HashMap<String, Object>>() {});
        long e1 = System.currentTimeMillis();
        System.out.println(res1);
        System.out.println("耗时: " + (e1 - s1));


    }
}
